package sublinear.model.db;

import sublinear.common.Filter;

public class ArticlesFilter implements Filter<DbGraphModel.Article> {

	private final static String [] specialNamespacePrefixes = new String[] {
		"User:", "Wikipedia:", "File:", "Template:", "Help:", "Category:",
		"Portal:", "Book:", "Draft:"
	};
	
	@Override
	public boolean accept(DbGraphModel.Article article) {
		for (String pref : specialNamespacePrefixes) {
			if (article.title.startsWith(pref))
				return false;
		}
		return true;
	}

}
